package com.yinhe.music.yhmusic.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yinhe.music.common.GlideHelper.GlideHelper;
import com.yinhe.music.yhmusic.R;
import com.yinhe.music.yhmusic.model.MvsInfo;

/**
 * Created by hasee on 2017/8/15.
 */

public class RecommendMvAdapter extends BaseQuickAdapter<MvsInfo, BaseViewHolder> {

    public RecommendMvAdapter() {
        super(R.layout.recommend_mv_item);
    }

    @Override
    protected void convert(BaseViewHolder helper,MvsInfo item) {
        helper.setText(R.id.mv_name,item.getMovieName())
                .setText(R.id.mv_artist_name,item.getSingerName())
                .setText(R.id.mv_listen_count,String.valueOf(item.getPlayNum()));
        ImageView image = helper.getView(R.id.mv_pic);
        GlideHelper.setImageResource(image,item.getImage(),R.drawable.ic_default_mv);
    }
}
